package com.ruoyi.factory.taxShare.controller;



import com.alibaba.fastjson.JSONObject;



/**
 * @ClassName ParamTest
 * @Description: TODO
 * @Author LiuJiaji
 * @Date 2023/12/22 15:58
 **/
public class ParamTest {

//    public static void main(String[] args) {
//        Calendar instance = Calendar.getInstance();
//        long timeInMillis = instance.getTimeInMillis();
//        Date time1 = instance.getTime();
//        instance.setTimeInMillis(timeInMillis);//设置时间戳
//        instance.setTime(new Date());//设置date类型的时间
//        instance.set(Calendar.YEAR,1);//设置年
//        instance.set(2023,12,29,16,18,02);//设置年月日时分秒
//        int i = instance.get(Calendar.YEAR);//获取年
//        instance.add(Calendar.YEAR,-2);//增加或减少年
//        instance.add(Calendar.MONTH,-2);//增加或减少月
//        instance.add(Calendar.DATE,-2);//增加或减少日
//
//
//        SimpleDateFormat simp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        String format = simp.format(instance.getTimeInMillis());
//        System.out.println(format);
//        System.out.println(instance.get(Calendar.YEAR));
//        instance.set(Calendar.MONTH,12);
//        instance.add(Calendar.MONTH,-1);
//        instance.add(Calendar.DATE,-1);
//        Date time = instance.getTime();
//
//
//        String ss="";
//        String ss2="";
//        int random = (int)(Math.random()*100000000);
//        ss2=String.valueOf(random);
//        ss="rf"+(random*100000000);
//        System.out.println(random);
//        System.out.println(ss2);
//
//        long l = System.currentTimeMillis();
//        long l1 = 1000*60*60*24;
//        long l2 = l1*365;
////        long l3 = 1000*60*60*24*365; "该类型默认是int,该计算会溢出"
//
////        1703837728142-
//        System.out.println(l);
//        System.out.println(l1);
//        System.out.println(l2);
////        System.out.println(l3);
//        long l3 = System.currentTimeMillis();
//
//        l3 = l3-(1000*60*60*24*365*2);
//        String format1 = simp.format(l2);
//        System.out.println(format1);
//
//
//    }

//    public static void main(String[] args) {
//        JSONObject po_invoice = new JSONObject();
//        po_invoice.put("pk_org_v","0001A110000000002TJ9");
//        po_invoice.put("ctrantypeid","0001A110000000002BM0");
//
//        JSONObject po_invoice_b = new JSONObject();
//        po_invoice_b.put("nnosubtax","0.00");
//        po_invoice_b.put("nastprice","2.752294");
//        JSONArray po_invoice_bj = new JSONArray();
//        po_invoice_bj.add(po_invoice_b);
//
//        JSONObject po_invoice_hb = new JSONObject();
//        po_invoice_hb.put("po_invoice",po_invoice);
//        po_invoice_hb.put("po_invoice_b",po_invoice_bj);
//
//        JSONArray po_invoice_hbj = new JSONArray();
//        po_invoice_hbj.add(po_invoice_hb);
//
//        JSONObject data = new JSONObject();
//        data.put("data",po_invoice_hbj);
//
//        System.out.println(data.toString());
//    }

    public static void main(String[] args) {

        String res = "{\"data\":267132.93}";
        Object parse = JSONObject.parse(res);
        net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(parse);
        net.sf.json.JSONObject jsonObject2 = net.sf.json.JSONObject.fromObject(res);
        String s = parse.toString();
        System.out.println(parse);
        System.out.println(s);
        System.out.println(jsonObject.toString());
        System.out.println(jsonObject2.toString());

    }


    }
